package com.luo.controller;

import com.luo.service.SummaryService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 功能：付款成功后对订单进行操作
 * 作者：Luo。
 * 日期：2024/3/27 17:10
 */
@WebServlet("/submitSummarySuccess")
public class SubmitSummarySuccess extends HttpServlet {

	SummaryService summaryService = new SummaryService();

	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		String id = req.getParameter("id");
		String money = req.getParameter("money");
		// 设置订单支付状态为支付成功
		int i = summaryService.updateSummaryStatus(id, "1");
		// 设置订单支付金额

	}
}
